home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
OOP_Course
/
Examples
/
ExtendDraw
/
Ellipse.bproj
/
Ellipse.m
< prev
next >
Wrap
Text File
|
1992-12-19
|
487b
|
34 lines
#import <appkit/appkit.h>
#import "Ellipse.h"
@implementation Ellipse:AShape
-drawShape
{
float rx,ry,cx,cy;
rx = bbox.size.width/2.0;
ry = bbox.size.height/2.0;
cx = bbox.origin.x+rx;
cy = bbox.origin.y+ry;
PSgsave();
PSsetlinewidth(0.0);
PStranslate(cx,cy);
PSscale(rx,ry);
PSnewpath();
PSarc(0.,0.,1.,0.,360.);
PSclosepath();
PSsetgray(shade);
if(fill)
PSfill();
else
PSstroke();
PSgrestore();
return self;
}
@end